/*
 * Text.h
 *
 *  Created on: Jul 18, 2009
 *      Author: kurt
 */

#ifndef TEXT_H_
#define TEXT_H_

#include "Drawable2DInterface.h"
#include "Font.h"
#include <string>

namespace objdraw 
{

class Text: public objdraw::Drawable2DInterface 
{
	protected:
		virtual ~Text();
		std::string text;
		
		/*** text size */
		Font * font;
		Font * alternate;
		float size;
//		Color color;
		Color shadowColor;
		unsigned int style;
		unsigned int encoding;
		
	public:
		Text();
		Text(const Text & r);
		
		Text(bool b, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(bool b, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(char c, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(char c, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(int i, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(int i, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(long l, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(long l, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(Object * obj, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(Object * obj, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(std::string str, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(std::string str, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(const char * str, float x, float y, Font * f = NULL, DrawingCanvas * canvas = NULL);
		Text(const char * str, Location origin, Font * f = NULL, DrawingCanvas * canvas = NULL);
		
		Font * getFont();
		std::string & getText();
		
		void setText(std::string str);
		
//		TODO virtual float getHeight();
		virtual float getWidth();
//		TODO virtual void setColor(Color c);
//		TODO virtual std::string toString();
		
		virtual void render();
};

}

#endif /* TEXT_H_ */
